package models

import "github.com/smash-llj/Nexa-server/global"

type RequestMessage struct {
	global.BaseModal
	RequestId   int    `gorm:"comment:请求id" json:"requestId"`
	ReceiverId  int    `gorm:"comment:接受id" json:"receiverId"`
	Description string `json:"description" gorm:"comment:附加消息"`
	Status      int    `json:"status" gorm:"default:0;comment:0为等待 1为接受 2为拒绝"`
	Request     User   `gorm:"foreignKey:RequestId;references:Id;constraint:OnDelete:CASCADE;"`
	Receiver    User   `gorm:"foreignKey:ReceiverId;references:Id;constraint:OnDelete:CASCADE;"`
}
